<?php
session_start();
      if (isset($_SESSION['k_username'])) {
include ("conexion.inc.php");
$link = Conectarse();
$editadopor=$_SESSION['k_username'];
$fecha = date("y-m-d h:i:s");
mysql_select_db("gotica_ordencompras" ,$link);
?>
<html><head><title>Cliente Registrado con Exito</title></head>
<body>
<?php
$sqll = "INSERT INTO cliente (N_Cliente , T_RUC, T_Telefono, T_direccion) ";
$sqll.= " VALUES (
'$_POST[nombre]',
'$_POST[ruc]',
'$_POST[telefono]',
'$_POST[direccion]')";
$resulta = mysql_query($sqll);
?>
<SCRIPT LANGUAGE="javascript">
location.href = "nuevocliente.php";
</SCRIPT>
</body>
</html>
<?
}else
{
	echo "<SCRIPT LANGUAGE=\"javascript\">";
echo "location.href = \"index.php\"";
echo "</SCRIPT>";
	}
?>